#include"UdpServer.hpp"
#include<iostream>
#include<memory>

void Usage(std::string proc)
{
    std::cerr << "Usage: " << proc << " localport" << std::endl;
}

int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(0);
    }
    EnableConsoleLogStrategy();
    uint16_t port=std::stoi(argv[1]);
    std::unique_ptr<UdpServer> usp=std::make_unique<UdpServer>(port);
    usp->Init();
    usp->Start();
    return 0;
}